home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / utilities / shell / vector11.lha / man / vector.man < prev   
Encoding:
Text File  |  1994-11-18  |  12.3 KB  |  323 lines

  1. VECTOR            SUPERUSER COMMANDS            17-Nov-1994
  2.  
  3.  
  4. NAME
  5.     vector - file ratio/validating system for AXsh
  6.  
  7. SYNOPSIS
  8.     vector [ check | dl | stat | ul ]
  9.     vector [ award <user> | init | new | scan | stat <user>]
  10.         (superuser only)
  11.  
  12. DESCRIPTION
  13.     Vector is a utility that provides a way of implementing ratios and
  14.     conviniently validating uploads for AXsh.  The AXsh/xpr/ffe trio
  15.     has no ratio system at all, which may cause problems for systems
  16.     that are open to the public.  Also, uploads must be handled manually
  17.     by first creating a description, then changing the file protections
  18.     so the file is visible, and then moving it manually.  Vector,
  19.     along with its companion utility AddDesc, handles descriptions,
  20.     takes care of ratios automatically, prompts the user for
  21.     descriptions and file placement, and makes validating much more
  22.     convenient.
  23.  
  24. WARNING
  25.     This document is intended for the systen administrator only, since
  26.     to the normal user Vector will be largely transparent and/or obvious.
  27.  
  28.     Also, Vector v1.1 is, as a colleague said, "very cool, but ugly."
  29.     This is true: I have concentrated on getting the core of the program
  30.     working before the public opening of my system, and not on the
  31.     frills.  As a direct corollary, only features that I find useful
  32.     exist.  Future versions will feature much more: if you have ideas,
  33.     please mail me.
  34.  
  35.     That said...
  36.  
  37. REQUIREMENTS
  38.     Vector needs KS 2.0 or better and the PIPE: device mounted.
  39.     And an AXsh BBS might be a good idea too.  =)  Everything else
  40.     necessary is included with the archive, I hope...
  41.  
  42. INSTALLATION
  43.     Vector needs configuration since the file configuration of each
  44.     BBS is quite different.  The simplest thing to do is to unpack
  45.     the Vector archive in your AXsh: directory, and then edit the
  46.     following files as instructed.
  47.  
  48.     The most crucial file is rc.vector.  You must edit the following
  49.     parameters (remember the / or : after _all_ directories!):
  50.  
  51.     %vectorpath:    This is where Vector stores its data files.  Default
  52.             is "AXsh:etc/vector/".  At the moment there are
  53.             only a few files, so you might wish to use just
  54.                         "AXsh:etc/".
  55.  
  56.     %uploadpath:    This is temporary directory where uploads are _first_
  57.             sent.  This directory must only contain the uploads
  58.             of the current upload session!  Default is
  59.             "Storage:Temp/", you will almost certainly need to
  60.             change this.  Note that you must insure that your
  61.             xprotos.tab paths match this.  Placing this
  62.             in physical media (ie. not RAM) is recommended,
  63.             in case the computer crashes or something...
  64.  
  65.     %initbyte:    This is the amount of bytes of credits given to
  66.             each user the first time they download or upload.
  67.             Defaults to 1000000 bytes (1MB).
  68.  
  69.     %uploadtype:    This defines the types of uploads available on your
  70.             system.  The format is <name> <directory> <minimum
  71.             accesslevel>.  For example:
  72.  
  73.             General      Storage:Uploads/   normal
  74.  
  75.             Would create a category named "General", whose
  76.             uploads are moved to Storage:Uploads/, and
  77.             which requires an accesslevel of "normal" or better.
  78.             The user will select among the types available.
  79.             The first blank line terminates the type listing.
  80.             If the above makes no sense, look at the included
  81.             rc.vector file.
  82.  
  83.     %filetype:    These are the types of files the sysop gets to
  84.             place files in.  The format is <name> <path>
  85.             <ratio>, where name and path are same as before
  86.             and ratio is an integer, ie. 3 would award
  87.             3 credits for each byte uploaded.  Example:
  88.  
  89.             Modules   Storage:Modules/  5
  90.  
  91.             Would create a category named "Modules", whose
  92.             files are moved to Storage:Modules/, and for which
  93.             a 1:5 ratio is in place.  The first blank line
  94.             terminates the type listing.  Again, if the above
  95.             makes no sense, look at the included rc.vector file.
  96.  
  97.     Once this is done, create the required directories and remember to
  98.     adjust etc/xprotos.tab as needed.  Then add bin/vector and
  99.     bin/adddesc to your AXsh:etc/rc.  Finally, type "vector init",
  100.     and Vector will proceed to create records from xpr.log.
  101.  
  102.     That installs Vector itself, now you'll have to set up your BBS so
  103.     that Vector is useful.  The scripts directory contains three scripts:
  104.     upload, ffe.axsh, and ffe.dos.  They attempt to    be universal and
  105.     should work for all systems.  Place these in a convinient 
  106.         world-readable place, I have a public /extern directory for scripts.
  107.     Add the following to your etc/GlobalLogin:
  108.  
  109.         alias upload "execute /extern/upload"
  110.         alias "xpr r z" "execute /extern/upload"
  111.         alias ffe "execute /extern/ffe.axsh"
  112.  
  113.     In Matrix, change the entries for uploading and FFE respectively to
  114.     "execute AXsh:extern/upload" and "execute AXsh:extern/ffe.dos".
  115.     Two separate FFE scripts are needed since AXsh and ADos handle
  116.     if-statements differently.
  117.  
  118.     One last thing is needed: depending on the size of your xpr.log
  119.     and the speed of your HD, you'll need to add the line
  120.  
  121.         vector >>AXsh:etc/adm/vector.log dl
  122.  
  123.     to either your AXsh launch script to be executed after the user
  124.     logs off or into a nightly cleanup script.  On my '030/25 machine
  125.     with a Quantum HD, the scan speed is approximately 50K/second,
  126.         ie. a 500K xpr.log is scanned in approx. 10 seconds.  You may
  127.         also wish to trim vector.log regularly or it will grow to an
  128.         unmanageable size.
  129.  
  130.     Now uploads and downloads are under Vector, and all you have to do
  131.     is type "vector scan" from your root account every now and then and
  132.     validate your uploads.
  133.  
  134. USER COMMANDS
  135.     Normal users can perform four commands, given as arguments to
  136.     Vector:
  137.  
  138.     check    This checks if a user has credits left, and if not
  139.         returns with return code 5 (WARN).  Useful for scripts.
  140.  
  141.     dl    This scans for new downloads and substracts credits.
  142.         This should be loaded after FFE and/or after the user logs
  143.         off, but may be performed nightly if xpr.log's length
  144.         makes it prohibitively slow.  Vector dl's output goes to
  145.         stdout but the format is intended for logging, so redirection
  146.         is possible and recommended.
  147.  
  148.     stat    This tells the number of credits the user has left.
  149.  
  150.     ul    This scans for new uploads, asks for descriptions,
  151.         deprotects, touches (updates the datestamp to present) and
  152.         moves them.  This should be a part of an uploading script
  153.         such as the included "ulscript".
  154.  
  155. SUPERUSER COMMANDS
  156.     There are an extra five commands available to superusers:
  157.  
  158.     award    This will award extra credits to a user.  Credits can also
  159.         be taken away by awarding negative bytes.
  160.  
  161.     init    This will initialize Vector's records completely, rereading
  162.         everything from xpr.log.  You will be asked for a default
  163.         ratio, which need not match the rc.vector default.
  164.  
  165.     new    This lists all new uploads and their descriptions since
  166.         the last 'Vector scan' command.
  167.  
  168.     scan    The most important superuser command, this scans for new
  169.         uploads and lets the sysop validate them.  For each
  170.         file, the sysop gets something like the following:
  171.  
  172.         Uploaded by elvis: "pelvis.gif", 123456 bytes
  173.         Description:
  174.         It's my pelvis in action.
  175.         (V)alidate, (Q)uick Validate, (D)elete, (I)gnore or (A)bort?
  176.  
  177.         V)alidate will ask you if you want to rewrite the description
  178.         or rename the file (and its description along with it,
  179.         naturally).  Then, you'll be presented with a list
  180.         of possible filetypes, plus the extra selections A B C D
  181.         that let you manipulate the file in any way you want.
  182.         Once you've made your selection, the files will be moved
  183.         and credits awarded.
  184.  
  185.         Q)uick Validate will leave description and filename
  186.         untouched and just ask you to pick a category.
  187.  
  188.         D)elete will delete the file and its description, with no
  189.         credits awarded.
  190.  
  191.         I)gnore will mark the file as scanned and go to the next
  192.         file, with no credits awarded.
  193.  
  194.         A)bort will quit Vector and leave all uploads on the
  195.         list, including ones before the abort, to be checked next
  196.         time.
  197.  
  198.     stat    Superusers may also specify the name of a user for stat.
  199.  
  200. SECURITY
  201.     Vector has rather poor security when it comes to avoiding
  202.     ripoff attempts, largely due to the fact that it's an add-on
  203.     and not an integral part of xpr.  Briefly, without giving too much
  204.     detail to would-be hackers:
  205.  
  206.     - credits are modified only after the download itself
  207.     - Vector's checking cannot anticipate the size of the download(s)
  208.       that follow
  209.     - Avoiding a Vector check from the shell is trivial
  210.  
  211.     In other words, Vector will not prevent a user who will leech
  212.     like hell once and never call back, or a shell-aware user
  213.     who will return to leech.  But as my excuse, I must say that
  214.     it's FFE's fault, not Vector's.  =)
  215.  
  216.     To stop such evil behavior, take the following draconian measures:
  217.  
  218.     - No shell access, or at least no access to ffe/xpr from shell.
  219.     - Run a "vector dl" as a daemon, maybe as often as every half hour.
  220.           Make the script kick the user out if the user goes over his limit.
  221.  
  222.     On my system I have not found such measures to be necessary,
  223.     but to each his own...
  224.  
  225. PROGRAMMERS
  226.     The SAS/C v6.5 source code to both Vector and AddDesc has been
  227.     included, so you hackers out there can cook up your own fixes.
  228.     To compile, just CD to the src directory and type "smake".  
  229.     If you come up with interesting modifications or find bugs, please
  230.     mail me instead of releasing modified versions.
  231.  
  232. FUTURE FEATURES
  233.     There are so many things I'm planning for Vector that it's not
  234.     funny...
  235.     - Unlimited ratio for some users
  236.     - A special version of FFE for Vector
  237.     - Much better validating menu with more things to fiddle with
  238.       (can you get vaguer than that?)
  239.     - Ability to view files and archives from within Vector
  240.     - Ability to leave files for later validation while validating others
  241.     - Replacing external protect/touch/move with internal code
  242.     - Configurability everywhere
  243.  
  244. AUTHOR           _
  245.     Jani "Guru Gnosis Sahib" Poijärvi
  246.     Internet: gnosis@brahman.nullnet.fi
  247.     BBS: Brahman, +358-0-498-797, 16800 24h/7d
  248.              (official Vector support site)
  249.  
  250. FILES
  251.     c:protect
  252.     /bin/adddesc
  253.     /bin/editor (or as defined in $visual)
  254.     /bin/move
  255.     /bin/touch
  256.     /etc/rc.vector
  257.     /etc/xprotos.tab
  258.     /etc/adm/vector.log
  259.     /etc/adm/xpr.log
  260.     /etc/vector/.lastcheck
  261.     /etc/vector/.newul
  262.     /etc/vector/.ratio
  263.  
  264. SEE ALSO
  265.     adddesc
  266.     morestat
  267.     xpr
  268.  
  269. NOTES
  270.     Move is a part of the AmigaDOS Replacement Project (ARP) v1.3
  271.     and is freely distributable.  Unlike some of ARP, it works quite
  272.     nicely with KS v2/v3, but it does require the arp.library.
  273.  
  274.     Touch is by Matthew Dillon, I assume it's freely distributable
  275.     since DICE's docs never mention it...
  276.  
  277.     It is theoretically possible to use Vector without AXsh...
  278.     however, I wouldn't recommend it, since you'd still have to use
  279.     xpr and Vector is largely pointless without FFE.
  280.  
  281.     The separate program "MoreStat" generates statistics with Vector's
  282.     ratio information, look for it at a good AXsh BBS near you.  =)
  283.  
  284. RESTRICTIONS
  285.     Vector has an arbitrary limit of 250 users with file records.
  286.     If this is too limiting, change the #define USER_MAX to something
  287.     bigger and recompile.  Mind you, on my system less than half the
  288.     users have Vector file records, so 250 should suffice for a while.
  289.     If the limit is passed (warnings will appear in the log), you
  290.     can purge dead users from .ratio manually; I may write a program
  291.     to do this automatically someday.
  292.  
  293.     Vector makes a number of possibly dangerous assumptions:
  294.     - The first two lines of xpr.log are headers and can be skipped over.
  295.     - The file name, location or size does not change between uploading
  296.       and the sysop validating it.
  297.  
  298. BUGS
  299.     On rare occasions, Vector will for some unknown reason write
  300.     two copies of its .ratio file in a row, resulting in all
  301.     records being duplicated and all sorts of weird things happening.
  302.     I have never been able to make this happen under "laboratory"
  303.     conditions and may recently have removed the bug causing this.
  304.     If this happens, remove the *first* half of records from .ratio
  305.     and mail me, describing the operations before the discovery
  306.     of the problem.
  307.  
  308.     Vector can handle filenames with spaces in them; however, it
  309.     (or more accurately Move) cannot deal with wildcard characters
  310.     in filenames, namely the following: # ? * ~ | ( ) [ ] { }
  311.     However, these characters in filenames are quite rare, so this
  312.     should not be a problem.
  313.  
  314.     If the same user downloads the same file on the same day several
  315.     times in a row, Vector will get confused and keep deducting
  316.     credits, once every check, until somebody else downloads
  317.     something.  This unlikely situation happens exactly once in my
  318.     6500-line xpr.log.
  319.  
  320.     If the file specified in .lastcheck cannot be found xpr.log,
  321.     Vector dl will report "Corrupted xpr.log" and fix .lastcheck to
  322.     point to the latest transfer.
  323.